<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <%@include file="/WEB-INF/views/common/common.jsp" %>

    <script type="text/javascript" src="/static/js/orderBill.js"></script>
</head>

<body>
<table id="bill_datagrid"></table>
<!--表单按钮-->
<div id="tb">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" data-cmd="add">新增订单</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">编辑订单</a>

    <shiro:hasPermission name="orderbill:changeState">
        <a href="#" class="easyui-linkbutton" id="changeState_btn" data-options="iconCls:'icon-remove',plain:true"
           data-cmd="changeState">审核订单</a>
    </shiro:hasPermission>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>
</div>


<div id="form_btn">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="save">保存</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancel">取消</a>
</div>

<div id="bill_dialog">
    <form id="bill_form" method="post">
        <input type="hidden" name="id"/>
        <table align="center" style="margin :15px; border-spacing:10px;">
            <tr>
                <td>订单编号:
                <input id="mySn" name="sn" style="width:170px;" class="easyui-textbox" readonly="readonly"
                           prompt="系统自动生成"></td>
            </tr>
            <tr>
                <td>业务时间:
                <input name="vdata" style="width:170px;" class="easyui-datetimebox"></td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;&nbsp;供应商: <input name="supplier.id" style="width:170px;" class="easyui-combobox"
                                data-options="url:'/supplier/selectAll.do',textField:'name',valueField:'id',panelHeight:'auto'">
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;仓库: <input name="depot.id" class="easyui-combobox" style="width:170px;"
                               data-options="url:'/depot/query.do',textField:'name',valueField:'id',panelHeight:'auto'">
                </td>
            </tr>
            <tr>
                <td>
                    <a onclick="add_button()"  class="easyui-linkbutton" data-options="iconCls:'icon-add'">添加明细</a>
                </td>
            </tr>
            <tr>
                <td>
                    <table id="add_table"  cellspacing="0" cellpadding="0" border="0" style="width: auto">
                        <thead>
                        <tr >
                            <th></th>
                            <th>货品名称</th>
                            <th>商品编号</th>
                            <th>商品售价</th>
                            <th>数量</th>
                            <th>金额小计</th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody id="edit_table_body">
                        <tr>
                            <td>
                                <a id="add_linkbutton" tag="pid" class="easyui-linkbutton" data-options="iconCls:'icon-add'"></a>
                            </td>
                            <td>
                                <input  name="name" id="productName" tag="name" class="easyui-textbox" style="width:100px;"/>
                            </td>
                            <td><input name="sn" id="productSn" tag="psn" class="easyui-textbox"  style="width:100px;"/></td>
                            <td><input name="costPrice" id="costPrice" tag="costPrice" class="easyui-textbox" style="width:100px;"/></td>
                            <td><input name="number" id="number" tag="count" class="easyui-textbox" style="width:100px;" ></input></td>
                            <td><input  id="total" tag="remark" class="easyui-textbox"style="width:100px;" /></td>
                            <td>
                                <a href="javascript:;"  class="removeItem">删除明细</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</div>
    <div id="dd">
  <table id="add_datagrid"></table>
    </div>
</body>
</html>












